<div class="form">
    <form name="form" action="" method="post">
        <fieldset>
            <legend>{step_new}:</legend>
            <div class="input_wrapper">
                
                <div class="input">
                    <label>{app_label}</label>
                    <span>
                        <select name="app">
                            <option value="">{choose_app}</option>
                        [OPEN list_app]
                            [LOOP app]
                            <option value="{app_value}">{app_name}</option>
                            [/LOOP app]
                        [CLOSE list_app]
                        </select>
                    </span>
                </div>
                <div class="input">
                    <label>{app_type_label}</label>
                    <span>
                        <select name="type_app">
                            <option value="">{choose_type}</option>
                            <option value="com">{com}</option>
                            <option value="action">{action}</option>
                            <option value="model">{model}</option>
                        </select>
                    </span>
                </div>
                
                <div class="input submit">
                    <input class="next" type="submit" name="save" value="{next}" />
                </div>
            </div>
        </fieldset>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function(){
       $('select[name="app"]').change(function(){
            app = $(this).val();
            if(app == 'admin'){
                html = '<option value="">Chọn kiểu ứng dụng</option><option value="com">Com</option><option value="action">Action</option><option value="model">Model</option><option value="module">Module</option>';
            }else if(app == 'public'){
                html = '<option value="">Chọn kiểu ứng dụng</option><option value="action">Action</option><option value="model">Model</option><option value="module">Module</option>';
            }else{
                html = '<option value="">Chọn kiểu ứng dụng</option>';
            }
            $('select[name="type_app"] option').remove();
            $('select[name="type_app"]').append(html);
       }); 
    });
</script>




